import java.util.ArrayList;
import java.util.Scanner;


public class MovieApp {
	
	public static int seatPerRow=12;
	public static final String[] cinemaClass = {"class 1","class 2","class 3","class 4"};
	public static final String[] movieClass = {"2D","2DBlockBuster","3D","3DBlockBuster"};
	public static final String[] movieStatus = {"Now showing","End of showing","Coming soon","Preview"};
	public static double price = 10;
	public static int dayClass =0;
	public static boolean loggedIn = false;
	
	public static ArrayList<CineplexItem> cineplexList = new ArrayList<CineplexItem>();
	public static ArrayList<MovieItem> movieList = new ArrayList<MovieItem>();
	public static ArrayList<GoersItem> goerList = new ArrayList<GoersItem>();
	public static ArrayList<StaffItem> staffList = new ArrayList<StaffItem>();

	
	private static ManageAccount manageAccount = new ManageAccount();
	private static ManageDisplay show= new ManageDisplay();
	private static ManageBooking manageBooking = new ManageBooking();
	private static CreateDataTest createDataTest = new CreateDataTest();
	
	public static void main(String[] args) {
		
		createDataTest.readCinema();
		createDataTest.readMovies();
		createDataTest.readShow();
		createDataTest.readStaff();
		int choice; 
    	Scanner sc = new Scanner(System.in); 
    	do { 
    		System.out.println("Enter the number of your choice: "); 
			System.out.println("1:  Search/List movie for showtimes"); 
			System.out.println("2:  Creat Booking"); 
			System.out.println("3:  Check booking status or booking history"); 
			System.out.println("4:  Configure System Setting ( for staff only)"); 
			System.out.println("5:  Exit "); 
			choice = sc.nextInt(); 
 
	switch (choice) { 
	    case 1: 
	    		//show.searhProcess();
	    		GUI demo = new GUI();
	    		demo.demo();
	            break; 
	    case 2: 
	    		show.searhProcess();
	    		break;
	    case 3:   
	    		System.out.println("Enter your email: ");
	    		String temp =sc.next().trim().toLowerCase();
	    		for (int i=0; i< goerList.size();i++)
	    			if (goerList.get(i).getGoerEmail().trim().toLowerCase().equals(temp))
	    				manageBooking.printBookingHistory(i);
	    		break;
	    case 4: 
	    		manageAccount.checkLogging();
	    		break;
	    case 5: 
	    	System.out.println("Program terminating...");
	    	break;
	    default:
	    	System.out.println("Program terminating...");
	    	break;
	}  
	} while (choice < 5); 
    sc.close();

	}

}
